import request from '@/utils/request'

// 查询开锁日志表列表
export function listLogs(query) {
  return request({
    url: '/lock/logs/list',
    method: 'get',
    params: query
  })
}

// 查询开锁日志表详细
export function getLogs(id) {
  return request({
    url: '/lock/logs/' + id,
    method: 'get'
  })
}

// 新增开锁日志表
export function addLogs(data) {
  return request({
    url: '/lock/logs',
    method: 'post',
    data: data
  })
}

// 修改开锁日志表
export function updateLogs(data) {
  return request({
    url: '/lock/logs',
    method: 'put',
    data: data
  })
}

// 删除开锁日志表
export function delLogs(id) {
  return request({
    url: '/lock/logs/' + id,
    method: 'delete'
  })
}

//统计本年度每月开锁的次数
export function countLogTypeByMonth() {
  return request({
    url: '/lock/logs/countLogTypeByMonth',
    method: 'get'
  })
}
